/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.tcc.fgv.imovel.controlle;

import static br.com.fgv.tcc.fgv.imovel.controlle.AbstractCrudBean.logger;
import br.com.fgv.tcc.fgv.imovel.model.Programa;
import br.com.fgv.tcc.fgv.imovel.service.ProgramaService;
import br.com.fgv.tcc.fgv.imovel.service.Service;
import java.io.Serializable;
import javax.ejb.EJB;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import org.apache.log4j.LogManager;

/**
 *
 * @author diego
 */
@Named(value = "programaM")
@SessionScoped
public class ProgramaMBean extends AbstractCrudBean<Programa> implements Serializable {

    @EJB
    private ProgramaService ejbFacade;


    public ProgramaMBean() {
        logger = LogManager.getLogger(Programa.class.getName());
        selected = new Programa();
    }

    @Override
    protected Service getServiceManager() {
        return ejbFacade;

    }

   
    

    public Programa getSelected() {
        return selected;
    }

    public void setSelected(Programa selected) {
        this.selected = selected;
    }

    @Override
    public  void novaInstancia() {
        selected = new Programa();
    }

    

}
